//
//  TapImageView.m
//  TthMusic
//
//  Created by lanou3g on 15/8/31.
//  Copyright (c) 2015年 陶天海. All rights reserved.
//

#import "TapImageView.h"

@implementation TapImageView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame target:(id)target action:(SEL)action {



    self = [super initWithFrame:frame];
    
    if (self) {
        //将参数传入tap点击事件
        UITapGestureRecognizer *imageTap = [[UITapGestureRecognizer alloc] initWithTarget:target action:action];
       
        
        
        
        
        //打开交互,否则不会响应
        self.userInteractionEnabled = YES;
        //添加手势
        [self addGestureRecognizer:imageTap];
        
        
        
    }
    
    return self;
    
    
}

@end
